package com.xzwk.subject.common.enums;

/**
 * 题目类型枚举
 *
 * @author YN
 */
public enum SubjectInfoTypeEnum {
  RADIO(1, "单选"),
  MULTPLE(2, "多选"),
  JUDGE(3, "判断"),
  BRIEF(4, "简单"),
  ;

  public int code;

  public String desc;

  SubjectInfoTypeEnum(int code, String desc) {
    this.code = code;
    this.desc = desc;
  }

  public static SubjectInfoTypeEnum getByCode(int codeVal) {

    for (SubjectInfoTypeEnum resultCodeEnum : SubjectInfoTypeEnum.values()) {
      if (resultCodeEnum.code == codeVal) {
        return resultCodeEnum;
      }
    }
    return null;
  }


}
